package pojo;

import java.math.BigDecimal;
import java.util.Objects;

public class Room {
    private int roomId;
    private String sex;
    private int size;
    private BigDecimal price;
    private int empty;
    private BigDecimal cash;//押金

    public Room() {
    }

    public Room(int roomId, String sex, int size, BigDecimal price, int empty, BigDecimal cash) {
        this.roomId = roomId;
        this.sex = sex;
        this.size = size;
        this.price = price;
        this.empty = empty;
        this.cash = cash;
    }

    public int getRoomId() {
        return roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getEmpty() {
        return empty;
    }

    public void setEmpty(int empty) {
        this.empty = empty;
    }

    public BigDecimal getCash() {
        return cash;
    }

    public void setCash(BigDecimal cash) {
        this.cash = cash;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Room room = (Room) o;
        return Objects.equals(roomId, room.roomId) &&
                Objects.equals(sex, room.sex) &&
                Objects.equals(size, room.size) &&
                Objects.equals(price, room.price) &&
                Objects.equals(empty, room.empty) &&
                Objects.equals(cash, room.cash);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roomId, sex, size, price, empty, cash);
    }

    @Override
    public String toString() {
        return "Room{" +
                "roomId=" + roomId +
                ", sex='" + sex + '\'' +
                ", size=" + size +
                ", price=" + price +
                ", empty=" + empty +
                ", cash=" + cash +
                '}';
    }
}
